package model;

import lombok.*;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;

/**
 * @className: ExecMethodModel
 * @author: ocxz1
 * @date: 2025/3/11 下午9:33
 * @Version: 1.0
 * @description: tmp-study 执行方法
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ExecuteMethod {

    /**
     * 执行方法的bean
     */
    private Object bean;

    /**
     * 执行方法
     */
    private Method method;

    private Annotation methodAnnotation;

    public <T extends Annotation> T getMethodAnnotation(Class<T> tClass) {
        return (T) methodAnnotation;
    }
}
